<?php

/**
 * Citologia form base class.
 *
 * @method Citologia getObject() Returns the current form's model object
 *
 * @package    citologia
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseCitologiaForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                  => new sfWidgetFormInputHidden(),
      'pacientes_id'        => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Pacientes'), 'add_empty' => false)),
      'usuarios_id'         => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Usuarios'), 'add_empty' => false)),
      'examenclinico_id'    => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Examen_Clinico'), 'add_empty' => false)),
      'descripcionhallazgo' => new sfWidgetFormTextarea(),
      'fur'                 => new sfWidgetFormDate(),
      'g'                   => new sfWidgetFormInputText(),
      'p'                   => new sfWidgetFormInputText(),
      'c'                   => new sfWidgetFormInputText(),
      'a'                   => new sfWidgetFormInputText(),
      'planifica'           => new sfWidgetFormInputText(),
      'planificametodo'     => new sfWidgetFormInputText(),
      'radioterapia'        => new sfWidgetFormInputText(),
      'radioterapiadate'    => new sfWidgetFormDate(),
      'conizacion'          => new sfWidgetFormInputText(),
      'conizaciondate'      => new sfWidgetFormDate(),
      'histerectomia'       => new sfWidgetFormInputText(),
      'histerectomiadate'   => new sfWidgetFormDate(),
      'created_at'          => new sfWidgetFormDateTime(),
      'updated_at'          => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                  => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'pacientes_id'        => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Pacientes'))),
      'usuarios_id'         => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Usuarios'))),
      'examenclinico_id'    => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Examen_Clinico'))),
      'descripcionhallazgo' => new sfValidatorString(array('max_length' => 300, 'required' => false)),
      'fur'                 => new sfValidatorDate(array('required' => false)),
      'g'                   => new sfValidatorInteger(array('required' => false)),
      'p'                   => new sfValidatorInteger(array('required' => false)),
      'c'                   => new sfValidatorInteger(array('required' => false)),
      'a'                   => new sfValidatorInteger(array('required' => false)),
      'planifica'           => new sfValidatorInteger(),
      'planificametodo'     => new sfValidatorString(array('max_length' => 45, 'required' => false)),
      'radioterapia'        => new sfValidatorInteger(),
      'radioterapiadate'    => new sfValidatorDate(array('required' => false)),
      'conizacion'          => new sfValidatorInteger(),
      'conizaciondate'      => new sfValidatorDate(array('required' => false)),
      'histerectomia'       => new sfValidatorInteger(),
      'histerectomiadate'   => new sfValidatorDate(array('required' => false)),
      'created_at'          => new sfValidatorDateTime(),
      'updated_at'          => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('citologia[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Citologia';
  }

}
